﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="WinnerCMS.WebUI.Admin.Template.Manage"
    CodeBehind="Manage.aspx.cs" %>

<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!doctype html>

<html>
<head runat="server">
    <title>网页模板集</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <meta content="no-cache" http-equiv="Pragma" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <style type="text/css">
        .style1
        {
            width: 120px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
       
            <table id="NavigationPath">
                <tr>
                    <td width="50%">
                        
                        
                        <asp:Label ID="lblPath" runat="server"></asp:Label>
                    </td>
                    <td width="50%">管理导航：<a href="Manage.aspx">模板集管理</a> &nbsp;| &nbsp;<a href="Add.aspx">
                                        添加模板集</a>
                    </td>
                </tr>
            </table>
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-bordered table-condensed table-hover"
                DataKeyNames="ID" OnRowCommand="GV_List_RowCommand">
                <HeaderStyle CssClass="HeaderStyle" />
                <Columns>
                    <asp:HyperLinkField   DataNavigateUrlFields="ID" 
                        HeaderText="模板名称" DataTextField="TemplateName" DataNavigateUrlFormatString="Add.aspx?Action=Edit&amp;ID={0}">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField  
                        HeaderText="模板目录" DataTextField="TemplatePath">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="Style" HeaderText="样式表目录">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="修改">
                        <ItemTemplate>
                            <asp:HyperLink ID="HL_Edit" runat="server" 
                                NavigateUrl='<%# Eval("ID", "Add.aspx?Action=Edit&ID={0}") %>' 
                                Target="_self" Text="修改"></asp:HyperLink>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="启用" ShowHeader="False">
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="UsedIt"
                                Text="启用" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除" ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="lblDelete" runat="server" CausesValidation="false" 
                                CommandName="Template_Delete" Text="删除"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="IsUsed" Visible="False" />
                </Columns>
            </asp:GridView>
          <table style="width:100%;">
                <tr>
                    <td class="style1">
                        <input ID="Button1" class="btn btn-default" 
                            onclick="window.location.href='Add.aspx'" style="cursor: pointer;" 
                            type="button" value="添加" /></td>
                    <td>
                        说明： 点击“模板名称”将转到修改模板的页面，本页的“修改”只是修改<strong>模板集</strong>信息 
                    </td>
                </tr>
            </table>

        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
